home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Alles Voor Internet / Tout Pour Internet
/
alles voor internet.iso
/
MacInternet™
/
Telnet
/
NCSA
/
tn3270 2.3d26 source
/
tn3270
/
sppcinterface.h
< prev
next >
Wrap
Text File
|
1991-05-28
|
3KB
|
75 lines
/* Definitions for interface to .SPPC driver */
#define MSGNUM 24 /* number of outstanding messages allowed */
#define CLIENTNUM 8 /* number of simultaneous clients */
#define NAMELENGTH 32 /* significant chars. in client name */
#define MSGLENGTH 128 /* maximum length of message */
/* Pointer to parmrec structure is passed in the first 4 bytes
of the csParam field. */
typedef struct {
unsigned char * name; /* register or lookup name */
Handle msg; /* handle to message storage*/
unsigned long * msgid; /* pointer for returned msg id */
unsigned long replyid; /* reply id to send or get */
unsigned long * replyidptr; /* reply id returned by get */
unsigned short msglen; /* message length */
unsigned short * msglenptr; /* pointer to message length */
short * refptr; /* pointer for returned refnum */
short refnum; /* caller's refnum */
short refnum2; /* destination refnum for send */
} parmrec;
/* Control call csCode values */
/* Register: required parameters are "name" and "refptr". The
specified name is registered, and a new reference number returned
via refptr */
#define SPPCreg 1
/* Deregister: required parameter is "refnum". The application
assigned "refnum" is deregistered, and any pending messages for
it deleted. */
#define SPPCdereg 2
/* Lookup: required parameters are "name" and "refptr". If an
application with the specified name is registered, its reference
number is returned via "refptr". */
#define SPPClookup 3
/* Send: required parameters are "refnum", "refnum2", "msg", "msglen",
and "msgid". "replyid" is not required, but must be set to zero
when not being used. "Msg" is a handle to a message which is sent
from the application with "refnum" to the application with "refnum2".
"Msglen" is the length of the message, and "msgid" is a pointer
for storing a unqiue identifier assigned to the message. "replyid"
may be used to optionally indicate this message is a reply to a
specific previous message. */
#define SPPCsend 4
/* Get: required parameters are "refnum", "refptr", "msg", "msglenptr",
"msgid", and "replyidptr". "replyid" is not required, but must be set to zero
when not being used. If a message is queued for the application with
"refnum", "refptr" is set to indicate the sending application, and
the message is stored in the storage provided by the "msg" handle.
"Msglenptr" is used to store the length of the message, and "msgid"
is a pointer for storing a unique identifier assigned to the message.
"Replyidptr" is used to store the reply id sent with this message.
If "replyid" is non-zero, "Get" will return only those messages
sent with a matching reply id.
Note that the application calling "Get" must allocate storage
for receiving the message. */
#define SPPCget 5
/* Clear: required parameter is "refnum". Any queued messages for
the application with "refnum" are deleted. The "deregister"
function invokes "clear" when deleting a client. */
#define SPPCclear 6
/* Delete Message: required parameter is "msgid". "Msgid" points
to the unique identifier for a message to be deleted. A message
can be deleted if it was sent, but not yet received by the
target application. */
#define SPPCdelmsg 7